import java.io.*;

public class Copy {
    public static void main(String[] args) throws IOException {
        f(new File("video/魔女之旅.mp4"));
    }
    public static void f(File video) throws IOException {
        File video2 = new File("video/"+video.getName());
        if(video2.createNewFile()){
            FileInputStream is = new FileInputStream(video);
            BufferedInputStream bis = new BufferedInputStream(is);
            FileOutputStream fos = new FileOutputStream(video2);
            BufferedOutputStream bos = new BufferedOutputStream(fos);
            byte[] data = new byte[1024];
            while (bis.read(data) != -1) {
                bos.write(data);
            }
            bis.close();
            bos.close();
        }
    }
}
